<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script src="../vue.js"></script>
</head>
<body>

	<div id="app">
		<child :content="'ha你好'"></child>
	</div>

	<script>

		Vue.component('child', {
			props: {
				content: {
					type: String,
					required: true,
					default: 'hello Seven',
					validator: function (value) {
						return (value.length < 5)
					}
				}
			},
			template: '<div>{{content}}</div>',
		});

		var vm = new Vue({
			el: '#app',
			data: {
				total: 6
			},
		});

	</script>
</body>
</html>